<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Strict//EN">
<html>

<head>
<meta http-equiv="Content-Language" content="en-us">
<title>sim.createPath</title>
<link rel="stylesheet" type="text/css" href="../../style.css">
</head>

<body>

<div align="center">
<table class=allEncompassingTable >
 <tr>
  <td >
<p><a href="../../index.html" TARGET="_top"><img src="../images/homeImg.png"></a></p>

<h1>Regular API function</h1>
<h3 class=subsectionBar><a name="simCreatePath" id="simCreatePath"></a>sim.createPath </h3>
<table class=apiTable>
<tr class=apiTableTr> 
<td class=apiTableLeftDescr>
Description 
</td> 
<td class=apiTableRightDescr>Creates a <a href="../paths.htm">path</a>.</td>
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftCSyn>
C synopsis
</td> 
<td class=apiTableRightCSyn></td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftCParam>C parameters</td> 
<td class=apiTableRightCParam>
</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftCRet>
C return value
</td> 
<td class=apiTableRightCRet>
</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLSyn>
Lua synopsis
</td> 
<td class=apiTableRightLSyn>int pathHandle=sim.createPath(table[] ctrlPts,int options=0,int subdiv=100,float smoothness=1.0,int orientationMode=0,table[3] upVector={0,0,1})</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLParam>Lua parameters</td> 
<td class=apiTableRightLParam>
<div><strong>ctrlPts</strong>: the control points, specified in row-major order, with <em>x/y/z/qx/qy/qz/qw</em> values for each path point</div>
<div><strong>options</strong>: bit-coded: bit0 set (1): path is hidden during simulation, bit1 set (2): path is closed, bit2 set (4): generates an extruded shape, bit3 set (8): show individual path points, bit4 set (16): the path points' orientation is computed according to the orientationMode below.</div>
<div><strong>subdiv</strong>: number of individual path points</div>
<div><strong>smoothness</strong>: a value between 0 (linear interpolation) and 1 (100% Bezier interpolation)</div>
<div><strong>orientationMode</strong>: value specifiying how the individual path points are oriented along the path, if bit16 of options is set: 0: x along path, y is up, 1: x along path, z is up, 2: y along path, x is up, 3: y along path, z is up, 4: z along path, x is up, 5: z along path, y is up</div>
<div><strong>upVector</strong>: the up vector, used for generating an extruded shape and for computing individual path point orientations</div>
</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLRet>
Lua return values
</td> 
<td class=apiTableRightLRet>
<div><strong>pathHandle</strong>: the handle of the created path object</div>
</td> 
</tr> 


</table> 


<br>
</td>
</tr>
</table>
</div>
</body>
</html>
